<!--
  ~ Licensed to the Apache Software Foundation (ASF) under one
  ~ or more contributor license agreements.  See the NOTICE file
  ~ distributed with this work for additional information
  ~ regarding copyright ownership.  The ASF licenses this file
  ~ to you under the Apache License, Version 2.0 (the
  ~ "License"); you may not use this file except in compliance
  ~ with the License.  You may obtain a copy of the License at
  ~
  ~     http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<nz-card nzType="inner" [nzTitle]="title" [nzLoading]="loading">
  <flink-table-display
    *ngIf="configurations.length; else noDataTemplate"
    [listOfData]="configurations"
  ></flink-table-display>
</nz-card>

<nz-card nzType="inner" nzTitle="JVM" [nzLoading]="loading">
  <flink-table-display
    *ngIf="environmentInfo; else noDataTemplate"
    [listOfData]="convertJVMToKV(environmentInfo.jvm)"
  ></flink-table-display>
</nz-card>

<nz-card nzType="inner" nzTitle="Classpath" [nzLoading]="loading">
  <nz-table
    *ngIf="environmentInfo; else noDataTemplate"
    [nzData]="environmentInfo.classpath"
    [nzSize]="'small'"
    [nzFrontPagination]="false"
    [nzShowPagination]="false"
    [nzScroll]="{ y: '200px' }"
  >
    <tr *ngFor="let classPath of environmentInfo.classpath">
      <td [attr.title]="classPath">{{ classPath }}</td>
    </tr>
  </nz-table>
</nz-card>

<ng-template #noDataTemplate>
  <div class="empty">
    <nz-empty class="ant-empty-normal" nzNotFoundImage="simple" *ngIf="!loading"></nz-empty>
  </div>
</ng-template>
